﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShopModel.aspx.cs" Inherits="Admin.Admin.ShopMan.ShopModel" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/common.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .tips
        {
            color: red;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="man_zone">
        <table width="99%" border="0" align="center" cellpadding="3" cellspacing="1" class="table_style">
            <tr>
                <td colspan="4">
                    <a href="ShopList.aspx" style="color: Green; padding-left: 20px;">>>返回</a>
                </td>
            </tr>
            <tr>
                <td class="left_title_1">
                    店铺编号
                </td>
                <td>
                    <asp:Label runat="server" ID="ShopID" Visible="False"></asp:Label>
                </td>
                <td class="left_title_1">
                    是否在前台显示
                </td>
                <td>
                    <asp:DropDownList runat="server" ID="IsAvailable">
                        <asp:ListItem Value="1" Text="显示"></asp:ListItem>
                        <asp:ListItem Value="0" Text="不显示"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="left_title_1">
                    店铺名称
                </td>
                <td>
                    <asp:TextBox ID="ShopName" runat="server" CssClass="TextBox"></asp:TextBox>
                </td>
                <td class="left_title_1">
                    店铺标语
                </td>
                <td>
                    <asp:TextBox ID="ShopSlogan" runat="server" CssClass="TextBox"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="left_title_1">
                    帐号
                </td>
                <td>
                    <asp:TextBox ID="Account" runat="server" CssClass="TextBox"></asp:TextBox>
                </td>
                <td class="left_title_1">
                    密码
                </td>
                <td>
                    <asp:TextBox ID="Password" runat="server" CssClass="TextBox"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="left_title_1">
                    店铺简介
                </td>
                <td colspan="3">
                    <asp:TextBox ID="ShopIntro" runat="server" CssClass="TextBox"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="left_title_1">
                    QQ
                </td>
                <td>
                    <asp:TextBox ID="QQ" runat="server" CssClass="TextBox"></asp:TextBox>
                </td>
                <td class="left_title_1">
                    年龄
                </td>
                <td>
                    <asp:TextBox ID="Age" runat="server" CssClass="TextBox"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="left_title_1">
                    身高(cm)
                </td>
                <td>
                    <asp:TextBox ID="Height" runat="server" CssClass="TextBox"></asp:TextBox>
                </td>
                <td class="left_title_1">
                    体重(kg)
                </td>
                <td>
                    <asp:TextBox ID="Weight" runat="server" CssClass="TextBox"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="left_title_1">
                    职业
                </td>
                <td>
                    <asp:TextBox ID="Job" runat="server" CssClass="TextBox"></asp:TextBox>
                </td>
                <td class="left_title_1">
                    所在地
                </td>
                <td>
                    <asp:TextBox ID="Location" runat="server" CssClass="TextBox"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="left_title_1">
                    在线时间段
                </td>
                <td colspan="3">
                    <asp:TextBox ID="OnlineTime" runat="server" CssClass="TextBox"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="left_title_1">
                    店铺公告
                </td>
                <td colspan="3">
                    <asp:TextBox ID="ShopNotice" runat="server" CssClass="TextBox"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="left_title_1">
                </td>
                <td>
                    <asp:Button ID="Editor" runat="server" OnClientClick="return check()" Text="保存" CssClass="Button"
                        OnClick="Editor_Click" />
                    <asp:Button ID="Delete" runat="server" Text="删除" OnClientClick="javascript:if(!confirm('确定删除?')){return false;}"
                        CssClass="Button" OnClick="Delete_Click" />
                    <span id="tips" class="tips"></span>
                </td>
            </tr>
        </table>
    </div>
    </form>
    <script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function check() {
            var num = new RegExp("^[0-9]*$");
            if ($("#ShopName").val == "") {
                $("#tips").val("店铺名不能为空");
                return false;
            }
            if ($("#Account").val == "") {
                $("#tips").val("店铺名不能为空");
                return false;
            }
            if ($("#Password").val == "") {
                $("#tips").val("店铺名不能为空");
                return false;
            }

            if ($("#Age").val() != "" && !num.test($("#Age").val())) {
                $("#tips").next().html("年龄必须为整数");
                return false;
            }

            if ($("#Height").val() != "" && !num.test($("#Height").val())) {
                $("#tips").next().html("身高必须为整数");
                return false;
            }

            if ($("#Weight").val() != "" && !num.test($("#Weight").val())) {
                $("#tips").next().html("体重必须为整数");
                return false;
            }

            return true;
        }
    </script>
</body>
</html>
